package com.example.demo;

import com.alibaba.excel.EasyExcel;
import lombok.experimental.UtilityClass;

import java.util.List;

@UtilityClass
public class ExcelUtils {
    public static <T> void exportToExcel(String path, List<T> data, Class<T> clazz) {
        EasyExcel.write(path, clazz)
                .sheet("sheet")
                .doWrite(data);
    }
}
